<!DOCTYPE html>
<html lang="chinese (simplified)">
<head>
        <meta charset="utf-8" />
        <title>使用pelican写博客</title>
        <link rel="stylesheet" href="/theme/css/main.css" />
</head>

<body id="index" class="home">
        <header id="banner" class="body">
                <h1><a href="/">ikerbo工作室 </a></h1>
                <nav><ul>
                    <li class="active"><a href="/category/pelican.html">pelican</a></li>
                </ul></nav>
        </header><!-- /#banner -->
<section id="content" class="body">
  <article>
    <header>
      <h1 class="entry-title">
        <a href="/shi-yong-pelicanxie-bo-ke.html" rel="bookmark"
           title="Permalink to 使用pelican写博客">使用pelican写博客</a></h1>
    </header>

    <div class="entry-content">
<footer class="post-info">
        <abbr class="published" title="2017-07-24T00:00:00+08:00">
                Published: 周一 24 七月 2017
        </abbr>

        <address class="vcard author">
                By                         <a class="url fn" href="/author/ikerbo.html">ikerbo</a>
        </address>
<p>In <a href="/category/pelican.html">pelican</a>.</p>

</footer><!-- /.post-info -->      <h2>写博客</h2>
<p>在content下面创建一个文件pelican-wirte.md</p>
<div class="highlight"><pre><span></span><code><span class="n">Title</span><span class="o">:</span> <span class="n">My</span> <span class="n">First</span> <span class="n">Review</span>
<span class="n">Date</span><span class="o">:</span> <span class="mi">2010</span><span class="o">-</span><span class="mi">12</span><span class="o">-</span><span class="mi">03</span> <span class="mi">10</span><span class="o">:</span><span class="mi">20</span>
<span class="n">Category</span><span class="o">:</span> <span class="n">Review</span>

<span class="n">Following</span> <span class="k">is</span> <span class="n">a</span> <span class="n">review</span> <span class="n">of</span> <span class="n">my</span> <span class="n">favorite</span> <span class="n">mechanical</span> <span class="n">keyboard</span><span class="o">.</span>
</code></pre></div>


<h2>生成博客</h2>
<p>博客写好之后还不能进行访问，需要把写好的博客转化为html代码，执行下面的命令进行生成</p>
<div class="highlight"><pre><span></span><code><span class="err">pelican content</span>
</code></pre></div>


<p>生成的文件都在<strong>output</strong>目录里面，这些文件就是博客运行需要的静态文件。</p>
<p>上传博客</p>
<p>在命令行里面切换到output目录下面，git命令</p>
<div class="highlight"><pre><span></span><code><span class="n">cd</span> <span class="o">~/</span><span class="n">project</span><span class="o">/</span><span class="n">yoursite</span><span class="o">/</span><span class="k">output</span>

<span class="n">git</span> <span class="n">push</span>
</code></pre></div>
    </div><!-- /.entry-content -->

  </article>
</section>
        <section id="extras" class="body">
                <div class="blogroll">
                        <h2>links</h2>
                        <ul>
                            <li><a href="http://getpelican.com/">Pelican</a></li>
                            <li><a href="http://python.org/">Python.org</a></li>
                            <li><a href="http://jinja.pocoo.org/">Jinja2</a></li>
                            <li><a href="#">You can modify those links in your config file</a></li>
                        </ul>
                </div><!-- /.blogroll -->
                <div class="social">
                        <h2>social</h2>
                        <ul>

                            <li><a href="#">You can add links in your config file</a></li>
                            <li><a href="#">Another social link</a></li>
                        </ul>
                </div><!-- /.social -->
        </section><!-- /#extras -->

        <footer id="contentinfo" class="body">
                <address id="about" class="vcard body">
                Proudly powered by <a href="http://getpelican.com/">Pelican</a>, which takes great advantage of <a href="http://python.org">Python</a>.
                </address><!-- /#about -->

                <p>The theme is by <a href="http://coding.smashingmagazine.com/2009/08/04/designing-a-html-5-layout-from-scratch/">Smashing Magazine</a>, thanks!</p>
        </footer><!-- /#contentinfo -->

</body>
</html>